package com.qqtech.qquan.sys.dao;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.qqtech.core.frame.dao.BaseDaoImpl;
import com.qqtech.qquan.sys.model.SysRole;
import com.qqtech.qquan.sys.model.SysRoleVo;

@Repository
public class SysRoleDaoImpl extends BaseDaoImpl<SysRole> implements SysRoleDao {
	public static final Logger log = LoggerFactory.getLogger(SysRoleDaoImpl.class);
	
	public SysRoleVo getByName(java.lang.String name) {
		return sqlSessionTemplate.selectOne(getSqlName("selectByName"), name);
	}

	@Override
	public List<SysRole> getbyUserId(Integer userId) {
		return this.sqlSessionTemplate.selectList("getbyUserId", userId);
	}	
}
